<template>
  <div class="ICT-train">
    <no-ssr>
      <bread :breadList=breadList></bread>
    </no-ssr>
    <div class="ICT-train-main">
            <div style="float: left;position: relative;">
              <div class="main-nav">
                  <nav-list :list=selfNavList @tonav="navChenge" ref="nav-list" id='nav-flag'></nav-list>
              </div>
            </div>
            <div class="ICT-main-body main-body-flag">
                <train-ict :descript="descript" ref="train-ict" title="信息安全" selfImg="/img/college/500599766 copy@2x.png"></train-ict>
                <information-course ref="course-ict" ></information-course>
                <lable-page-information ref="lable-page-ict"></lable-page-information>            
                <job-ict ref="job-ict" :employ=employList :overlay=overlayList :jobMore='false'></job-ict>
                <information-excellent ref='student-ict'></information-excellent>
                <!-- <information-student></information-student> -->
                <!-- <student-ict title="优秀学员" ref="student-ict" :studentList=studentData :maxShow=4></student-ict> -->
                
            </div>
        </div>
  </div>
</template>

<script>
import bread from '@/components/breadcrumb'
import navList from '@/components/navList'
import trainIct from '@/components/college/train_ict'
import informationCourse from '@/components/college/informationCourse'
import lablePageInformation from '@/components/college/lable_page_information'
import jobIct from '@/components/college/job_ict'
import informationExcellent from '@/components/college/informationExcellent'
// import informationStudent from '@/components/college/information_student'
// import studentIct from '@/components/college/student_ict'

import { collegeEmployment, serviceOverlay, collegeStudent, customEnterprise } from '@/api/getData'

export default {
  name: 'information',
  data () {
      return{
        breadList: [
          {
            text: '国科教育',
            routeName: 'college-intro'
            },
            {
            text: '信息安全',
            routeName: ''
            }
        ],
        selfNavList: [
            {
                text: '信息安全',
                ref: 'train-ict'
            },
            {
                text: '课程体系',
                ref: 'course-ict'
            },
            {
                text: '课程详情',
                ref: 'lable-page-ict'
            },
            {
                text: '就业方向',
                ref: 'job-ict'
            },
            {
                text: '优秀学员',
                ref: 'student-ict'
            }
        ],
        contcatData: [],
        employList: [],
        dataList: [],
        overlayList: [],
        studentData: [],
        courseData: [],
        descript: ''
      }
    
  },
  created(){
    
  },
  async mounted(){
    await customEnterprise.call(this,5).then(res=>{
      if(res.length!=0){
        this.descript = res[0].descr
      }
    })

    await collegeEmployment.call(this,3).then(res=>{
      this.employList = res;
    })
    await serviceOverlay.call(this,4).then(res=>{
        this.overlayList = res;
    })
    await collegeStudent.call(this).then(res=>{
        this.studentData = res;
    })
    this.$refs['nav-list'].addNavEvent()
  },
  components: {
    bread,
    navList,
    trainIct,
    informationCourse,
    lablePageInformation,
    jobIct,
    informationExcellent
  },
  computed: {
    
  },
  methods: {
      navChenge(key){
        document.body.scrollTop = this.$refs[key].$el.offsetTop +230; 
　　    document.documentElement.scrollTop = this.$refs[key].$el.offsetTop +230;
      }
  }
}
</script>

<style lang="stylus" scoped>
.ICT-train{
  width: 1200px;
  padding-top: 20px;
  padding-bottom: 60px;
  margin: 0 auto; 
  border-bottom: 1px solid transparent;
}
.ICT-train-main{
    position: relative;
    .ICT-main-body{
        margin-left: 246px;
    }  
}

</style>
